
#ifndef example15_1_CatDogScene_h
#define example15_1_CatDogScene_h
#include "cocos2d.h"
#include "GameObjHero.h"
#include "DogHero.h"
//#include "GameObjEnemy.h"
#include "GameMark.h"
using namespace cocos2d;
class CatDog : public cocos2d::CCLayer
{
public:
	static CatDog sGameMain;
	CCMenuItemImage  *pChangeHeroCloseItem;
	CCSprite *blood1;
	CCSprite *blood2;
	CCSprite *blood3;
	CCSprite *bg1;
	CCSprite *bg2;
	short blood;
	CCArray *bullets;
	CCArray *enemybullets;
	void menuBackCallback(CCObject* pSender);
	bool isreduce;
	bool isover;
	int heroRoleFlag;
	void setover();
	DogHero*  dogHero;
	CCSprite* gameover;
	CCArray * gamefood;
	CCArray *foodpositions;
	virtual bool init();
	void updateBullet(float ft);
	virtual void update(float time);
	static cocos2d::CCScene* scene();
	void releaseenemyBullet(int x,int y);
	void releaseheroBullet(int x,int y);
	bool isCollion(CCPoint p1,CCPoint p2,int w1,int h1,int w2,int h2);
	void setherohurt();
	void resetreduce(float ft);
	void updateHero(float ft);
	void changeHeroRole(CCObject* pSender);
	GameMark* gamemark;
	GameObjHero * hero;
	void  heroPositionSyn(float ft);
	CREATE_FUNC(CatDog);
};

class  FoodPosition:public cocos2d::CCObject{
public :
	int posX;
	int posY;
};

#endif
